﻿using SqlSugar;

namespace Api.Shared.Model.Yanji
{
    public class DeviceRunTime
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public string? Name { get; set; } = string.Empty;

        public float? TodayTime { get; set; }

        public int Status { get; set; }
        public string? StatusStr
        {
            get
            {
                return Status switch
                {
                    1 => "自动",
                    2 => "手动",
                    3 => "停机",
                    4 => "离线",
                    _ => "异常" // 或者你可以抛出一个异常，表示无效的值
                };
            }
        }
        public DateTime Time { get; set; } = DateTime.Now;
        public string TimeStr
        {
            get { return Time.ToString(); }
        }
    }
}
